package com.runa.persistence.repository;

import com.runa.monitor.comm.entity.CommValve;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface CommValveRepository extends JpaRepository<CommValve, String> {

    @Query("SELECT c FROM CommValve c WHERE id IN (:ids)")
    List<CommValve> getAllByIds(@Param("ids") List<String> ids);


    CommValve findByIdAndModelLike(String id, String model);

    List<CommValve> findByNetEquipmentId(String netEquipmentId);

    List<CommValve> findBySerial(String serial);
}
